package com.zzh.order.impl.impl;

import com.zzh.api.model.UserEntity;
import com.zzh.order.impl.feign.MemberFeign;
import com.zzh.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderImpl implements OrderService {

    @Autowired
    private MemberFeign memberFeign;


    @RequestMapping("/orderToMember")
    public String orderToMember(String name) {
        UserEntity userEntity = memberFeign.getMember(name);
        if(25==userEntity.getAge()){
            return "25";
        }
        return "26";
    }
}
